package com.boyunv.chainduty.example01;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/19 21:17
 *@version 1.0
 */

public class Client {
    public static void main(String[] args) {
        Handler a=new HandlerA();      
        Handler b=new HandlerB();      
        Handler c=new HandlerC();   
        
        //创建处理链
        a.setSuccessor(b);
        b.setSuccessor(c);
        
        RequestData requestData = new RequestData("请求数据:  ABCD");
        //调用处理链头部的方法
        a.handle(requestData);
                
    }
}
